import matplotlib.pyplot as plt
import numpy as np

x=np.linspace(-10,10,100)
y=np.linspace(-10,10,100)

#计算x和y的相交点a
X,Y=np.meshgrid(x,y)

#计算z的坐标
Z=np.sqrt(X**2+Y**2)
plt.contourf(X,Y,Z)
plt.contour(X,Y,Z)
plt.show()